package common.web.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import common.hibernate.service.BaseService;
import common.rbac.po.Group;
import common.rbac.po.Region;
import common.web.vo.Result;

@RestController
@RequestMapping("/common/select")
public class SelectAction extends CommonAction {

	@Autowired
	@Qualifier("baseServiceImpl")
	protected BaseService baseService;

	@RequestMapping("/viewRegion/id/{id}")
	public Result viewRegion(@PathVariable String id){
		return Result.createResult(baseService.get(Region.class, id));
	}
	@RequestMapping("/viewGroup/id/{id}")
	public Result viewGroup(@PathVariable String id){
		return Result.createResult(baseService.get(Group.class, id));
	}
	
	
	
}
